package com.design.work341;

/*==============================================*/
/* This class implements Interface GeoForm. Together than
/* form the implementation part of the bridge pattern
/*==============================================*/

public class Ellipsoid implements GeoForm {
    private double aRadius;
    private double bRadius;
    private double cRadius;

    public Ellipsoid(double aRadius, double bRadius, double cRadius) {
        this.aRadius = aRadius;
        this.bRadius = bRadius;
        this.cRadius = cRadius;
    }

    public double computeVolume() {
        double volume = (4.0/3.0) * 3.1415926 * aRadius * bRadius * cRadius;
        return volume;
    }
}
